package com.encryption.util;

import flex.messaging.FlexContext;
import flex.messaging.FlexSession;

public class SessionUtil {
	
	public static FlexSession getSession(){
		return FlexContext.getFlexSession();
	}
	
	public static Object getAttribute(String name){
		if(getSession() != null)
			return getSession().getAttribute(name);
		
		return null;
	}
	
	public static void setAttribute(String name, Object value){
		if(getSession() != null)
			getSession().setAttribute(name, value);
	}
	
	public static void removeAttribute(String name){
		if(getSession() != null)
			getSession().removeAttribute(name);
	}
}
